var e = require;
var t = module;
var o = exports;
var n,
    i = o,
    a =
        ((n = function (e, t) {
            return (n =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
                })(e, t);
        }),
        function (e, t) {
            function o() {
                this.constructor = e;
            }
            n(e, t), (e.prototype = null === t ? Object.create(t) : ((o.prototype = t.prototype), new o()));
        }),
    r = function (e, t, o, n) {
        var i,
            a = arguments.length,
            r = a < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, o)) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, o, n);
        else
            for (var s = e.length - 1; s >= 0; s--)
                (i = e[s]) && (r = (a < 3 ? i(r) : a > 3 ? i(t, o, r) : i(t, o)) || r);
        return a > 3 && r && Object.defineProperty(t, o, r), r;
    };
Object.defineProperty(i, "__esModule", {value: !0}), (i.ViewModelType = void 0);
var s = e("WechatExportManager");
i.ViewModelType = cc.Enum({
    None: 0,
    StartModuleView: 1,
    AchieveView: 2,
    CountDownView: 3,
    EggView: 4,
    GameOverView1: 5,
    GameOverView2: 6,
    GameOverView3: 7,
    GetCoinTipView: 8,
    LuckDrawView: 9,
    MatchPlayersView: 10,
    ProgressTaskView: 11,
    RankView: 12,
    SettlementView: 13,
    SignInView: 14,
    SkinLevelView: 15,
    SkinTrialView: 16
});
var c = cc._decorator,
    l = c.ccclass,
    d = c.property,
    u = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (
                (t.viewModelType = i.ViewModelType.None),
                (t.btn_backHome = null),
                (t.isMainView = !1),
                (t.PopCloseShowMainView = !0),
                t
            );
        }
        var o;
        return (
            a(t, e),
            (o = t),
            (t.prototype.onEnable = function () {
                ad.curr_platform == window.ad.Platform.WECHAT &&
                    this.viewModelType != i.ViewModelType.None &&
                    (this.isMainView && (o.mianView = this),
                    this.isMainView
                        ? o.mianView && o.mianView.ShowMainViewAd()
                        : (o.mianView && o.mianView.HideMainViewAd(),
                          this.viewModelType == i.ViewModelType.AchieveView
                              ? this.ShowAchieveView()
                              : this.viewModelType == i.ViewModelType.CountDownView
                              ? this.ShowCountDownView()
                              : this.viewModelType == i.ViewModelType.EggView
                              ? this.ShowEggView()
                              : this.viewModelType == i.ViewModelType.GameOverView1
                              ? this.ShowGameOverView1()
                              : this.viewModelType == i.ViewModelType.GameOverView2
                              ? this.ShowGameOverView2()
                              : this.viewModelType == i.ViewModelType.GameOverView3
                              ? this.ShowGameOverView3()
                              : this.viewModelType == i.ViewModelType.GetCoinTipView
                              ? this.ShowGetCoinTipView()
                              : this.viewModelType == i.ViewModelType.LuckDrawView
                              ? this.ShowLuckDrawView()
                              : this.viewModelType == i.ViewModelType.MatchPlayersView
                              ? this.ShowMatchPlayersView()
                              : this.viewModelType == i.ViewModelType.ProgressTaskView
                              ? this.ShowProgressTaskView()
                              : this.viewModelType == i.ViewModelType.RankView
                              ? this.ShowRankView()
                              : this.viewModelType == i.ViewModelType.SettlementView
                              ? this.ShowSettlementView()
                              : this.viewModelType == i.ViewModelType.SignInView
                              ? this.ShowSignInView()
                              : this.viewModelType == i.ViewModelType.SkinLevelView
                              ? this.ShowSkinLevelView()
                              : this.viewModelType == i.ViewModelType.SkinTrialView && this.ShowSkinTrialView(),
                          this.btn_backHome && this.btn_backHome.on("click", this.onClick_backHome, this)));
            }),
            (t.prototype.onDisable = function () {
                ad.curr_platform == window.ad.Platform.WECHAT &&
                    this.viewModelType != i.ViewModelType.None &&
                    (this.isMainView && (o.mianView = null),
                    this.isMainView
                        ? o.mianView && o.mianView.HideMainViewAd()
                        : (this.viewModelType == i.ViewModelType.AchieveView
                              ? this.HideAchieveView()
                              : this.viewModelType == i.ViewModelType.CountDownView
                              ? this.HideCountDownView()
                              : this.viewModelType == i.ViewModelType.EggView
                              ? this.HideEggView()
                              : this.viewModelType == i.ViewModelType.GameOverView1
                              ? this.HideGameOverView1()
                              : this.viewModelType == i.ViewModelType.GameOverView2
                              ? this.HideGameOverView2()
                              : this.viewModelType == i.ViewModelType.GameOverView3
                              ? this.HideGameOverView3()
                              : this.viewModelType == i.ViewModelType.GetCoinTipView
                              ? this.HideGetCoinTipView()
                              : this.viewModelType == i.ViewModelType.LuckDrawView
                              ? this.HideLuckDrawView()
                              : this.viewModelType == i.ViewModelType.MatchPlayersView
                              ? this.HideMatchPlayersView()
                              : this.viewModelType == i.ViewModelType.ProgressTaskView
                              ? this.HideProgressTaskView()
                              : this.viewModelType == i.ViewModelType.RankView
                              ? this.HideRankView()
                              : this.viewModelType == i.ViewModelType.SettlementView
                              ? this.HideSettlementView()
                              : this.viewModelType == i.ViewModelType.SignInView
                              ? this.HideSignInView()
                              : this.viewModelType == i.ViewModelType.SkinLevelView
                              ? this.HideSkinLevelView()
                              : this.viewModelType == i.ViewModelType.SkinTrialView && this.HideSkinTrialView(),
                          this.btn_backHome && this.btn_backHome.off("click", this.onClick_backHome, this),
                          this.PopCloseShowMainView && o.mianView && o.mianView.ShowMainViewAd()));
            }),
            (t.prototype.onClick_backHome = function () {
                ad.adInterface.hideBanner(!1), s.default.instance.showFullAd();
            }),
            (t.prototype.ShowMainViewAd = function () {
                if (this.viewModelType == i.ViewModelType.StartModuleView)
                    for (var e = 0; e < 1; e++) {
                        var t = 25 + 120 * e;
                        s.default.instance.showSingleAd({left: t, bottom: 0});
                    }
            }),
            (t.prototype.HideMainViewAd = function () {
                this.viewModelType == i.ViewModelType.StartModuleView && s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowAchieveView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 5; t++) {
                        var o = 25 + 120 * e,
                            n = 0 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 5; t++) {
                        var i = 25 + 120 * e;
                        (n = 0 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideAchieveView = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowCountDownView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 5; t++) {
                        var o = 25 + 120 * e,
                            n = 0 + 150 * t;
                        s.default.instance.showSingleAd({left: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 5; t++) {
                        var i = 25 + 120 * e;
                        (n = 0 + 150 * t), s.default.instance.showSingleAd({right: i, top: n});
                    }
            }),
            (t.prototype.HideCountDownView = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowEggView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 2; t++) {
                        var o = 25 + 120 * e,
                            n = 200 + 150 * t;
                        s.default.instance.showSingleAd({left: o, top: n});
                    }
                s.default.instance.showCarouselAd({bottom: 0});
            }),
            (t.prototype.HideEggView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowGameOverView1 = function () {
                for (var e = 0; e < 5; e++) {
                    var t = 25 + 120 * e;
                    s.default.instance.showSingleAd({left: t, bottom: 0});
                }
            }),
            (t.prototype.HideGameOverView1 = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowGameOverView2 = function () {
                s.default.instance.showCarouselAd({bottom: 0});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 3; t++) {
                        var o = 25 + 120 * e,
                            n = 0 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 3; t++) {
                        var i = 25 + 120 * e;
                        (n = 0 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideGameOverView2 = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowGameOverView3 = function () {
                s.default.instance.showSingleAd({left: 25, bottom: 75});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 5; t++) {
                        var o = 0 + 120 * e,
                            n = 25 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
            }),
            (t.prototype.HideGameOverView3 = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowGetCoinTipView = function () {
                s.default.instance.showCarouselAd({bottom: 0});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 2; t++) {
                        var o = 25 + 120 * e,
                            n = 200 + 150 * t;
                        s.default.instance.showSingleAd({left: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 3; t++) {
                        var i = 25 + 120 * e;
                        (n = 25 + 150 * t), s.default.instance.showSingleAd({right: i, top: n});
                    }
            }),
            (t.prototype.HideGetCoinTipView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowLuckDrawView = function () {
                s.default.instance.showCarouselAd({bottom: 0});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 2; t++) {
                        var o = 25 + 120 * e,
                            n = 200 + 150 * t;
                        s.default.instance.showSingleAd({left: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 3; t++) {
                        var i = 25 + 120 * e;
                        (n = 25 + 150 * t), s.default.instance.showSingleAd({right: i, top: n});
                    }
            }),
            (t.prototype.HideLuckDrawView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowMatchPlayersView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 3; t++) {
                        var o = 25 + 120 * e,
                            n = 25 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 3; t++) {
                        var i = 25 + 120 * e;
                        (n = 25 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideMatchPlayersView = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowProgressTaskView = function () {
                s.default.instance.showCarouselAd({bottom: 0});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 3; t++) {
                        var o = 25 + 120 * e,
                            n = 25 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 2; t++) {
                        var i = 25 + 120 * e;
                        (n = 200 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideProgressTaskView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowRankView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 5; t++) {
                        var o = 25 + 120 * e,
                            n = 25 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 1; t++) {
                        var i = 25 + 120 * e;
                        (n = 185 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideRankView = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowSettlementView = function () {
                s.default.instance.showCarouselAd({bottom: 0});
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 3; t++) {
                        var o = 25 + 120 * e,
                            n = 20 + 150 * t;
                        s.default.instance.showSingleAd({left: o, top: n});
                    }
            }),
            (t.prototype.HideSettlementView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.ShowSignInView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 5; t++) {
                        var o = 25 + 120 * e,
                            n = 0 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 5; t++) {
                        var i = 25 + 120 * e;
                        (n = 0 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
            }),
            (t.prototype.HideSignInView = function () {
                s.default.instance.hideAllSingleAd();
            }),
            (t.prototype.HideSkinLevelView = function () {}),
            (t.prototype.ShowSkinLevelView = function () {}),
            (t.prototype.ShowSkinTrialView = function () {
                for (var e = 0; e < 1; e++)
                    for (var t = 0; t < 3; t++) {
                        var o = 25 + 120 * e,
                            n = 25 + 150 * t;
                        s.default.instance.showSingleAd({right: o, top: n});
                    }
                for (e = 0; e < 1; e++)
                    for (t = 0; t < 3; t++) {
                        var i = 25 + 120 * e;
                        (n = 25 + 150 * t), s.default.instance.showSingleAd({left: i, top: n});
                    }
                s.default.instance.showCarouselAd({bottom: 0});
            }),
            (t.prototype.HideSkinTrialView = function () {
                s.default.instance.hideCarouselAd(), s.default.instance.hideAllSingleAd();
            }),
            (t.mianView = null),
            r([d({type: i.ViewModelType})], t.prototype, "viewModelType", void 0),
            r([d(cc.Node)], t.prototype, "btn_backHome", void 0),
            r([d()], t.prototype, "isMainView", void 0),
            r([d()], t.prototype, "PopCloseShowMainView", void 0),
            (o = r([l], t))
        );
    })(cc.Component);
i.default = u;
